/**
 * jims
 */
package com.jims.master.modules.finance.dao;

import com.jims.master.common.persistence.CrudDao;
import com.jims.master.common.persistence.annotation.MyBatisDao;
import com.jims.master.common.web.impl.BaseDto;
import com.jims.master.modules.finance.entity.OutpAcctMaster;
import com.jims.master.modules.finance.entity.OutpRcptMaster;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
/**
 * 门诊收费记录DAO接口
 * @author chentao
 * @version 2017-03-06
 */
@MyBatisDao
public interface OutpRcptMasterDao extends CrudDao<OutpRcptMaster> {
    /**
     * 门诊确认收费
     * @param map
     * @author 赵宁
     */
    public void saveCharges(Map<String, Object> map);

    /**
     * 确认结账--更新收费主记录acctNo
     * @param outpAcctMaster
     * @author 赵宁
     */
    public void updateRcptAcctNo(OutpAcctMaster outpAcctMaster);

    /**
     * 根据门诊号查询 需要退费的信息
     * @param clinicNo
     * @param orgId
     * @return  List<OutpRcptMaster>
     * @author 赵宁
     */
    public List<OutpRcptMaster> getBillInfo(@Param("clinicNo") String clinicNo, @Param("orgId") String orgId);

    /**
     * 门诊确认退费
     * @param map
     * @author 赵宁
     */
    public void confirmRefund(Map<String, Object> map);

    /**
     * 修改收费状态
     * @param rcptNo
     * @return int
     * @author 赵宁
     */
    public int updateChargeFlag(@Param("rcptNo") String rcptNo, @Param("chargeIndicator") String chargeIndicator, @Param("orgId") String orgId);

    public OutpRcptMaster findByRcptNo(OutpRcptMaster outpRcptMaster);
    /**
     * 优惠计算
     * @param map
     * @author 赵宁
     */
    public void getPrefer(Map<String, Object> map);

    /**
     * 退费信息 查询
     * @param outpRcptMaster
     * @return
     * @author 赵宁
     */
    public List<OutpRcptMaster> findRefundCharges(OutpRcptMaster outpRcptMaster);

    /**
     * 获取当前登录人最小收费日期
     * @param outpRcptMaster
     * @return
     * @author 赵宁
     */
    public String getMinRcptDate(OutpRcptMaster outpRcptMaster);

    /**
     * 通过流水号查询结算号
     * @param outpRcptMaster
     * @return
     */
    public OutpRcptMaster findSerialNoRcptNo(OutpRcptMaster outpRcptMaster);

    /**
     * 获取门诊医保报销对照
     * @return
     */
    public BaseDto getViemCode(@Param("userId") String userId);
}